{% extends "base.html" %}

{% block content %}

    {% if user.is_authenticated %}

        <div>
            <table>
                <thead>
                <tr>
                    <th>Próf</th>
                    <th>grade</th>
                </tr>
                </thead>
                <tfoot>
                <tr>
                    <td>AVG</td>
                    <th></th>
                    <td>{{avg_grade}}</td>
                </tr>
                <tbody>
                {% for student in allResultByStudent %}
                <tr>
                    <td>{{ student.name }}</td>
                    <td> {{ student.grade }} </td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>

    {% else %}
        <p>Welcome, new user. Please log in.</p>
    {% endif %}
{% endblock %}